#include "BaseBird.h"
#include "helper.h"

BaseBird::BaseBird(void):
m_pFace()
{
}

BaseBird::~BaseBird(void)
{
	m_pFace->release();
}

BaseBird* BaseBird::birdWithFile( const char* facePath )
{
	BaseBird* bb = new BaseBird;
	bb->m_pFace = CCSprite::spriteWithFile(facePath);
	bb->m_pFace->retain();
	bb->autorelease();

	return bb;
}

cocos2d::CCRect BaseBird::getAABB()
{
	return hRectOfNode(m_pFace);

}

void BaseBird::setPosition( const CCPoint& pos )
{
	m_position = pos;
	m_pFace->setPosition(m_position);
}

void BaseBird::update()
{
	m_pFace->setPosition(m_position);
}
